<template>
	<page-body>
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center flex_0_higd"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub fd0_0_higd'>
					<view class='flex flex-wrap align-center fd0_0_c0_higd' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">
						<text class='fu-iconfont2  fd0_0_c0_c0_higd'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text class='fd0_0_c1_c0_higd'>考试结果</text>
					</view>
					<view class='flex flex-wrap align-center justify-end fd0_0_c0_higd'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch benben-flex-layout flex_1_higd">
				<view class='flex flex-direction align-stretch'>
					<view class='flex flex-wrap align-center'>
						<text class='fd1_0_c0_c0_higd'>{{info.name}}</text>
					</view>
					<view class='flex flex-wrap align-center fd1_0_c1_higd'>
						<text class='fd1_0_c1_c0_higd'>提交时间：{{info.time}}</text>
					</view>
					<view class='flex flex-wrap align-center fd1_0_c2_higd'>
						<text class='fd1_0_c1_c0_higd'>作答时长：{{info.use_time}}</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center fd1_1_higd'>
				</view>
				<view class='flex flex-direction align-stretch fd1_2_higd'>
					<view class='flex flex-direction align-stretch fd1_2_c0_higd'>
						<view class='flex flex-wrap align-center justify-center jgym_fd1_2_c0_c0_higd'>
							<image class='jgym_fd1_2_c0_c0_c0_higd' mode="aspectFit" :src='STATIC_URL+"259.png"'>
							</image>
							<view class='flex flex-direction align-stretch justify-center jgym_fd1_2_c0_c0_c1_higd'>
								<view class='flex flex-wrap align-center justify-center jgym_fd1_2_c0_c0_c1_c0_higd'>
									<text class='jgym_fd1_2_c0_c0_c1_c0_c0_higd'>{{info.score}}</text>
									<text class='jgym_fd1_2_c0_c0_c1_c0_c1_higd'>{{$t('分')}}</text>
								</view>
								<view class='flex flex-wrap align-center'>
									<text class='jgym_fd1_2_c0_c0_c1_c1_c0_higd'>{{$t('本次考试得分')}}</text>
								</view>
								<view class='flex flex-wrap align-center'>
									<text>考试需超过{{info.paper_mark}}分</text>
								</view>
							</view>
						</view>
						<view class='flex flex-wrap align-center justify-center'>
							<button class='jgym_fd1_2_c0_c1_c0_higd'>{{info.is_pass==1?'已通过':'未通过'}}</button>
						</view>
					</view>
					<!-- <view class='flex flex-wrap align-center justify-center fd1_2_c0_higd'>
                        <benben-progress active-color="#D32A29" unit="%" :show-value='true' value-color="#333333" value-font-weight="700" value-font-size="72" inactive-color="#e5e5e5" bg-color="#ffffff" duration="600" width="420" borderWidth="18" progress='85' />
                    </view> -->
					<view class='flex flex-wrap align-center justify-around '>
						<view class='flex flex-direction flex-wrap align-center justify-center'>
							<text class='fd1_2_c1_c0_c0_higd'>{{info.correct_num}}</text>
							<text class='fd1_2_c1_c0_c1_higd'>{{$t('答对题数')}}</text>
						</view>
						<view class='flex flex-direction flex-wrap align-center justify-center'>
							<text class='fd1_2_c1_c0_c0_higd'>{{info.error_num}}</text>
							<text class='fd1_2_c1_c0_c1_higd'>{{$t('答错题数')}}</text>
						</view>
						<view class='flex flex-direction flex-wrap align-center justify-center'>
							<text class='fd1_2_c1_c0_c0_higd'>{{info.wd_num}}</text>
							<text class='fd1_2_c1_c0_c1_higd'>{{$t('未作答数')}}</text>
						</view>
						<view class='flex flex-direction flex-wrap align-center justify-center'>
							<text class='fd1_2_c1_c0_c0_higd'>{{info.answer_radio}}%</text>
							<text class='fd1_2_c1_c0_c1_higd'>正确率</text>
						</view>
					</view>
					<view class='flex flex-direction flex-wrap align-center justify-center fd1_2_c2_higd'>
						<!-- <button class='fd1_2_c2_c0_higd' @tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pagexxzx/lxdetail/lxdetail?type=${type}&aid=${id}`">{{$t('重新练习')}}</button> -->
						<button class='fd1_2_c2_c1_higd'  @tap.stop="seeAnswal">{{$t('答案解析')}}</button>
					</view>
				</view>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</page-body>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"info": "",
				"type": "",
				"id": ""
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			let {
				type,
				examlog_id
			} = options
			if (type !== undefined) this.type = type
			if (examlog_id !== undefined) this.id = examlog_id
			this.getinfoFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//查看答题结果
			async getinfoFunc() {
				let data6864a0df9316b = await this.$api.post(global.apiUrls.post64b50fc705845, {
					examlog_id: this.id
				});

				if (data6864a0df9316b.data.code != 1) {
					this.$message.info(data6864a0df9316b.data.msg);
					return
				}
				this.info = data6864a0df9316b.data.data;
			},
			seeAnswal() {
				let aid = '';
				// if (this.type == 1) {
				// 	aid = this.total.aid;
				// } else {
				// 	aid = this.aid
				// }
			  // aid = this.list.total.aid
				uni.redirectTo({
					url: '/pageschool/school/trueOrFalseQuestions/trueOrFalseQuestions?aid=' + this.id
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;

		.flex_1_higd {
			margin: 20rpx 0rpx 0rpx 0rpx;
			background: rgba(255, 255, 255, 1);
			background-size: 100% auto;
			padding: 32rpx 40rpx 32rpx 40rpx;

			.fd1_0_c0_c0_higd {
				color: #333;
				font-size: 32rpx;
				font-weight: 500;
			}

			.fd1_0_c1_higd {
				margin: 28rpx 0rpx 28rpx 0rpx;
			}

			.fd1_0_c2_higd {
				margin: 0rpx 0rpx 32rpx 0rpx;
			}

			.fd1_1_higd {
				background: #EEEEEE;
				width: 750rpx;
				height: 2rpx;
			}

			.jgym_fd1_2_c0_c1_c0_higd {
				border-radius: 33rpx 33rpx 33rpx 33rpx;
				width: 220rpx;
				line-height: 60rpx;
				font-size: 24rpx;
				background: #D32A29;
				color: #fff;
			 height: 72rpx;
				border: 4px solid #FFE3E3;
			}

			.fd1_2_higd {
				// margin: 32rpx 0rpx 32rpx 0rpx;

				.jgym_fd1_2_c0_c0_higd {
					position: relative;

					.jgym_fd1_2_c0_c0_c0_higd {
						width: 420rpx;
						height: 364rpx;
						border-radius: 0rpx;
					}

					.jgym_fd1_2_c0_c0_c1_higd {
						position: absolute;

						.jgym_fd1_2_c0_c0_c1_c0_higd {
							margin: 100rpx 0rpx 0rpx 0rpx;

							.jgym_fd1_2_c0_c0_c1_c0_c0_higd {
								color: rgba(211, 42, 41, 1);
								font-size: 60rpx;
								font-weight: 600;
							}

							.jgym_fd1_2_c0_c0_c1_c0_c1_higd {
								color: rgba(211, 42, 41, 1);
								font-size: 32rpx;
							}
						}

						.jgym_fd1_2_c0_c0_c1_c1_c0_higd {
							font-size: 36rpx;
							color: #333;
							font-weight: 600;
							margin: 36rpx 0rpx 20rpx 0rpx;
						}
					}
				}

				.fd1_2_c0_higd {
					margin: 44rpx 0rpx 72rpx 0rpx;
					position: relative;
				}

				.fd1_2_c2_higd {
					margin: 70rpx 0rpx 0rpx 0rpx;

					.fd1_2_c2_c0_higd {
						border-radius: 49rpx;
						width: 450rpx;
						line-height: 98rpx;
						font-size: 24rpx;
						background: #D32A29;
						color: #fff;
						height: 98rpx;
						margin: 0rpx 0rpx 28rpx 0rpx;
					}

					.fd1_2_c2_c1_higd {
						border-radius: 49rpx;
						width: 450rpx;
						line-height: 68rpx;
						font-size: 24rpx;
						color: var(--benbenFontColor0);
						height: 98rpx;
						border: 1px solid #D32A29;
						background: rgba(255, 255, 255, 1);
						background-size: 100% auto;
						
						color: #D32A29;
						width: 280rpx;
						height: 68rpx;
						border-radius: 8rpx;
						border: 1px solid #D32A29;
					}
				}
			}
		}

		.fd1_0_c1_c0_higd {
			font-size: 32rpx;
			color: rgba(102, 102, 102, 1);
		}

		.fd1_2_c1_c0_c0_higd {
			font-size: 48rpx;
			color: #333;
			font-weight: 700;
			margin: 0rpx 0rpx 24rpx 0rpx;
		}

		.fd1_2_c1_c0_c1_higd {
			font-size: 28rpx;
			color: rgba(102, 102, 102, 1);
		}

		.flex_0_higd {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;

			.fd0_0_higd {
				padding: 0rpx 32rpx 0rpx 32rpx;

				.fd0_0_c1_c0_higd {
					font-size: 36rpx;
					font-weight: 700;
					color: #333333;
					line-height: 50rpx;
				}
			}
		}

		.fd0_0_c0_higd {
			width: 120rpx;

			.fd0_0_c0_c0_higd {
				font-size: 36rpx;
				color: #333;
			}
		}
	}
</style>
